<?php
/**
 * Created by PhpStorm.
 * User: yf
 * Date: 2018/8/15
 * Time: 上午10:39
 */

namespace App\HttpController;


use EasySwoole\Http\AbstractInterface\AbstractRouter;
use FastRoute\RouteCollector;

class Router extends AbstractRouter
{

    function initialize(RouteCollector $routeCollector)
    {
        
        $routeCollector->get('/','WebSocket/index');
        
        //TODO 推送对应的消息
        $routeCollector->get('/api/push', '/WebSocket/push');           //TODO 推送单个用户消息；FD=指定客户端
        $routeCollector->get('/api/pushLists', '/WebSocket/pushLists');   //TODO 推送所有用户消息；FD=全体客户端
        
    }
}